package com.chinasofti.controlcommon.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("sys_user")//表和表映射
public class SysUser {
    @TableId(value = "id",type = IdType.AUTO)//自增主键
    private Integer id;
    //@TableField("username")//跟数据库字段对应
    private String username;
    private String telephone;
    private String mail;
    private String sex;
    private String passwordold;
    private String password;
    private Integer passworderror;
    private Integer dept_id;
    private Integer company_id;
    private Integer status;
    private String remark;
    private String operator;
    //RESTFul Url就可以输入日期格式，否则转换错误，400错误,timezone表示东八区
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    //@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operate_time;
    private String operate_ip;
}
